<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="zh" xml:lang="zh" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Artifact: 测试用例</title>
<meta name="uma.type" content="Artifact">
<meta name="uma.name" content="rup_test_case">
<meta name="uma.presentationName" content="测试用例">
<meta name="uma.category" content="@Type:@Name:@DisplayName">
<meta name="uma.category" content="WorkProductType:specification:规约">
<meta name="element_type" content="Artifact">
<meta name="filetype" content="description">
<meta name="role" content="">
<link rel="StyleSheet" href="./../../css/default.css" type="text/css">
<script src="./../../scripts/ContentPageResource.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/ContentPageSection.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/ContentPageSubSection.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/ContentPageToolbar.js" type="text/javascript" language="JavaScript"></script><script src="./../../scripts/contentPage.js" type="text/javascript" language="JavaScript"></script><script type="text/javascript" language="JavaScript">
					var backPath = './../../';
					var imgPath = './../../images/';
					var nodeInfo=null;
					contentPage.preload(imgPath, backPath, nodeInfo, '', false, false, false);
				</script>
</head>
<body>
<div id="breadcrumbs"></div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top"><a name="Top"></a>
<div id="page-guid" value="{D525758B-EBA2-4F59-9BA6-226820C27ADD}"></div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="pageTitle" nowrap="true">Artifact: 测试用例</td><td width="100%">
<div align="right" id="contentPageToolbar"></div>
</td><td width="100%" class="expandCollapseLink" align="right"><a name="mainIndex" href="./../../index.htm"></a><script language="JavaScript" type="text/javascript" src="./../../scripts/treebrowser.js"></script></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="pageTitleSeparator"><img src="./../../images/shim.gif" alt="" title="" height="1"></td>
</tr>
</table>
<div class="overview">
<table width="97%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50"><img src="./../../rup/workproducts/resources/testcase.jpg" alt="" title=""></td><td>
<table class="overviewTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">该工件定义一组确定用来对目标测试项的某些特定方面作出评估的测试输入、执行条件和预期结果。</td>
</tr>
<tr>
<td>Domains: <a href="./../../rup/domains/test_FBB424F8.html" guid="_SPvXcN7IEdm8G6yT7-Wdqw">测试</a>
<br>Work Product Kinds: <a href="./../../rup/workproducttypes/specification_435F570D.html" guid="_3aJCcN7REdmjRZts2c4ZjQ">规约</a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Purpose</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td class="sectionTableSingleCell"><a id="Top" name="Top"></a><a key="测试用例（test case）" text="工件定义" name="XE_test_case__artifact_definition" id="XE_test_case__artifact_definition" class="index"></a><a id="Purpose" name="Purpose"></a><a key="测试用例（test case）" text="用途" name="XE_test_case__purpose_of" id="XE_test_case__purpose_of" class="index"></a> 
<ul>
    <li>
        列举足够数量的特定测试，以确保评估的完整性
    </li>
    <li>
        确定和推测出需要的测试脚本和驱动程序（包括手动和自动的）
    </li>
    <li>
        通过描述关键的观察点和控制点以及任何前置条件和后置条件，概述测试脚本和驱动程序的实现情况
    </li>
</ul></td>
</tr>
</table>
</div>
<div class="sectionHeading">Relationships</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row">Roles</th><td class="sectionTableCell" width="42%"><span class="sectionTableCellHeading">Responsible:
								</span>
<ul>
<li>
<a href="./../../rup/roles/rup_test_analyst_4637F9F0.html" guid="{8728060F-9DAD-42AD-B0B6-668C9AEA531D}">测试分析人员</a>
</li>
</ul>
</td><td class="sectionTableCell"><span class="sectionTableCellHeading">Modified By:
								</span>
<ul>
<li>
<a href="./../../rup/roles/rup_test_analyst_4637F9F0.html" guid="{8728060F-9DAD-42AD-B0B6-668C9AEA531D}">测试分析人员</a>
</li>
</ul>
</td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row">Tasks</th><td class="sectionTableCell" width="42%"><span class="sectionTableCellHeading">Input To:
								</span>
<ul>
<li>
<a href="./../../rup/tasks/analyze_test_failure_7E42EE55.html" guid="{EA0E3D2C-F87E-49CA-8832-F791886D5741}">Analyze Test Failure</a>
</li>
<li>
<a href="./../../rup/tasks/define_test_details_2B6BD36F.html" guid="{1F825D50-70B1-48BA-B99F-010F6B44B77B}">Define Test Details</a>
</li>
<li>
<a href="./../../rup/tasks/implement_test_35C1B0AA.html" guid="{BC805E79-736B-42D5-BDC1-B95E7D002312}">Implement Test</a>
</li>
<li>
<a href="./../../rup/tasks/define_testability_elements_B792858D.html" guid="{CDA7EC1B-2D50-46BE-A3BA-C621EAF22D84}">定义可测性元素</a>
</li>
<li>
<a href="./../../rup/tasks/structure_the_test_implementation_AAB73625.html" guid="{ED9DF0C0-744A-443A-AEBA-604382E05A5F}">构造测试实现</a>
</li>
<li>
<a href="./../../rup/tasks/determine_test_results_630C9EC9.html" guid="{74E51E86-ECAB-4A61-9A88-FD358EE6F2B1}">确定测试结果</a>
</li>
</ul>
</td><td class="sectionTableCell"><span class="sectionTableCellHeading">Output From:
								</span>
<ul>
<li>
<a href="./../../rup/tasks/define_test_details_2B6BD36F.html" guid="{1F825D50-70B1-48BA-B99F-010F6B44B77B}">Define Test Details</a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Description</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row">Main Description</th><td class="sectionTableCell"><p>
    测试用例指定和传达特定条件，需要对这些条件进行验证，以便能够对目标测试项某些特定方面作出评估。测试用例与测试构想不同，不同之处在于测试用例是形式更为完整的测试规约。测试用例可以由许多事物激发，但通常将包含与项目相关的一部分需求（例如用例和性能特征）和风险。一般说来，测试用例规约在以下情况下最有用，即测试实现本身过于复杂，如果没有测试用例提供的更抽象的说明作为支持，则会难以理解。
</p><!--EndFragment--></td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row">Brief Outline</th><td class="sectionTableCell"><a id="BriefOutline" name="BriefOutline"></a><a key="测试用例（test case）" text="简述" name="XE_test_case__brief_outline_of" id="XE_test_case__brief_outline_of" class="index"></a> 
<ol>
    <li>
        <b>Test Case Description</b><br />
        A description of the purpose or objective of the test, the scope, and any preconditions of the test.<br />
    </li>
    <li>
        <b>Execution Condition</b><br />
        A description of a condition that will be exercised during this test.<br />
        <ol type="i">
            <li>
                <b>Preconditions</b><br />
                For each execution condition, describe the required state that the system should be in before the test can
                commence.<br />
            </li>
            <li>
                <b>Test Inputs</b><br />
                For each execution condition, enumerate a list of the specific stimuli to be applied during the test. This
                is generally referred to as the "Inputs" to the test, and includes the objects or fields interacted with
                and the specific data values entered when executing this Test Case.<br />
            </li>
            <li>
                <b>Observation Points</b><br />
                During the test execution, enumerate what specific observations should be made.<br />
            </li>
            <li>
                <b>Control Points</b><br />
                During the test execution, identify any points where the flow of control may alter or vary.<br />
            </li>
            <li>
                <b>Expected Results</b><br />
                The resulting state or observable conditions that are expected as a result of the test having been
                executed. Note that this may cover both positive and negative responses (such as error conditions and
                failures).<br />
            </li>
            <li>
                <b>Postconditions</b><br />
                For each execution condition, describe the required state that the system should be returned to, allowing
                subsequent tests to be performed.<br />
                <br />
            </li>
        </ol>
    </li>
</ol></td>
</tr>
</table>
</div>
<div class="sectionHeading">Illustrations	</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row">Templates</th><td class="sectionTableCell">
<ul>
<li>
<a href="./../../nup_base/guidances/templates/test_usecae_1BFAF553.html" guid="_YHiagMHeEd2t0aE8JqsYOg">测试用例</a>
</li>
</ul>
</td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row">Reports</th><td class="sectionTableCell">
<ul>
<li>
<a href="./../../formal_resources/guidances/reports/test_design_specification_C7516DBB.html" guid="2.814781091755941E-306">测试设计规约 </a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<div class="sectionHeading">Tailoring</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row">Representation Options</th><td class="sectionTableCell"><a id="Tailoring" name="Tailoring"></a> 
<p>
    In certain domains and testing cultures, Test Cases are considered optional work products, whereas in others they are
    highly formalized and mandatory. As such, both the contents and format of Test Cases may require modification to meet
    the needs of each specific organization or project.
</p>
<p>
    When they are recorded (both formally and informally), two main styles are followed:
</p>
<ul>
    <li>
        The first is a standard text document structure using a format similar to that previously outlined in the <i>Brief
        Outline</i>. Often, multiple Test Case instances or variations are specified in a single document, grouped by the
        general purpose or objective of the tests.<br />
    </li>
    <li>
        The second style uses some form of table or database. Test-Case instances are specified, one per row, with columns
        provided to facilitate sorting and filtering by different criteria.
    </li>
</ul>
<p>
    Some consideration should also be given to ongoing measurement of the test cases for progress, effectiveness, and so
    forth. Consider requirements-based test coverage, in which each Test Case traces back to at least one test idea and at
    least one system requirement, which represents a subset of the Product requirements (see <a class="elementLinkWithUserText" href="./../../rup/guidances/concepts/key_measures_of_test_62253EE4.html" guid="5.312818155786224E-305">Technique: Key Measures of Testing</a>).
</p>
<p>
    As mentioned, it is typical for multiple Test Case instances or variations to be specified in a single document,
    usually grouped by the general purpose or objective of the tests. This may be realized as multiple execution conditions
    described within the one document, one per unique Test Case instance.
</p>
<p>
    Optionally the Test Case can be enclosed partially or completely within the <a class="elementLink" href="./../../rup/workproducts/rup_test_ideas_list_2A0F8E03.html" guid="{45219F27-0F84-4FD5-A7BC-73C19226303B}">测试构想列表</a> or <a class="elementLink" href="./../../rup/workproducts/rup_test_script_2140080.html" guid="{293A9F23-BB20-4993-AABE-76C1E8E1A589}">测试脚本</a>.&nbsp;
</p>
<p>
    <br />
    <br />
</p></td>
</tr>
</table>
</div>
<div class="sectionHeading">More Information</div>
<div class="sectionContent">
<table class="sectionTable" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<th class="sectionTableHeading" scope="row">Checklists</th><td class="sectionTableCell">
<ul>
<li>
<a href="./../../rup/guidances/checklists/test_case_3D3B8089.html" guid="4.184028082950642E-305">测试用例 </a>
</li>
</ul>
</td>
</tr>
<tr valign="top">
<th class="sectionTableHeading" scope="row">Guidelines</th><td class="sectionTableCell">
<ul>
<li>
<a href="./../../rup/guidances/guidelines/test_case_81FD1D9F.html" guid="1.3981505661923931E-304">测试用例</a>
</li>
<li>
<a href="./../../rup/guidances/guidelines/equivalence_class_analysis_F89FE998.html" guid="3.8675740383428907E-305">等价类分析 </a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<table class="copyright" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="copyright">Copyright &copy; 2008 版权所有 东软集团股份有限公司&nbsp; 联系邮箱:<a href="mailto:tcoe@neusoft.com">tcoe@neusoft.com</a></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<script type="text/javascript" language="JavaScript">
				contentPage.onload();
			</script>
</html>
